package com.cqupt.medical.exception.handler;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * <p>@author Jay</p>
 * <p>@date 2020/7/26 14:21</p>
 * <p>@Description:异常抛出的Http状态码，异常都需要进行注册，不允许出现WhitePage</p>
 */
@ControllerAdvice
public class MyExceptionHandler {
    /**
     * 404
     */
    @ResponseStatus(HttpStatus.NOT_FOUND)
    @ExceptionHandler(NullPointerException.class)
    public void doNullPointerException() {
    }
}
